+Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patch from Felix Bellaby <felix@pooh.u-net.com>
+
+ * gdk/gdk.c: Use XmbSetWMProperties to set
+ the class/command on the loader window so that the
+ client machine is also set in the same place.
+ (For X11R5 sesssion management compatibility)
+
+ * gdk/gdk.c: (gdk_set_sm_client_id) Implementation
+ of function to set the session manager client ID.
+
+ * gdk/gdkwindow.c (gdk_window_new): Set
+ WM_CLIENT_LEADER propertiy on all windows pointing
+ back to GDK's leader window.
+
Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
+Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patch from Felix Bellaby <felix@pooh.u-net.com>
+
+ * gdk/gdk.c: Use XmbSetWMProperties to set
+ the class/command on the loader window so that the
+ client machine is also set in the same place.
+ (For X11R5 sesssion management compatibility)
+
+ * gdk/gdk.c: (gdk_set_sm_client_id) Implementation
+ of function to set the session manager client ID.
+
+ * gdk/gdkwindow.c (gdk_window_new): Set
+ WM_CLIENT_LEADER propertiy on all windows pointing
+ back to GDK's leader window.
+
Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
+Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patch from Felix Bellaby <felix@pooh.u-net.com>
+
+ * gdk/gdk.c: Use XmbSetWMProperties to set
+ the class/command on the loader window so that the
+ client machine is also set in the same place.
+ (For X11R5 sesssion management compatibility)
+
+ * gdk/gdk.c: (gdk_set_sm_client_id) Implementation
+ of function to set the session manager client ID.
+
+ * gdk/gdkwindow.c (gdk_window_new): Set
+ WM_CLIENT_LEADER propertiy on all windows pointing
+ back to GDK's leader window.
+
Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
+Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patch from Felix Bellaby <felix@pooh.u-net.com>
+
+ * gdk/gdk.c: Use XmbSetWMProperties to set
+ the class/command on the loader window so that the
+ client machine is also set in the same place.
+ (For X11R5 sesssion management compatibility)
+
+ * gdk/gdk.c: (gdk_set_sm_client_id) Implementation
+ of function to set the session manager client ID.
+
+ * gdk/gdkwindow.c (gdk_window_new): Set
+ WM_CLIENT_LEADER propertiy on all windows pointing
+ back to GDK's leader window.
+
Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
+Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patch from Felix Bellaby <felix@pooh.u-net.com>
+
+ * gdk/gdk.c: Use XmbSetWMProperties to set
+ the class/command on the loader window so that the
+ client machine is also set in the same place.
+ (For X11R5 sesssion management compatibility)
+
+ * gdk/gdk.c: (gdk_set_sm_client_id) Implementation
+ of function to set the session manager client ID.
+
+ * gdk/gdkwindow.c (gdk_window_new): Set
+ WM_CLIENT_LEADER propertiy on all windows pointing
+ back to GDK's leader window.
+
Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
+Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patch from Felix Bellaby <felix@pooh.u-net.com>
+
+ * gdk/gdk.c: Use XmbSetWMProperties to set
+ the class/command on the loader window so that the
+ client machine is also set in the same place.
+ (For X11R5 sesssion management compatibility)
+
+ * gdk/gdk.c: (gdk_set_sm_client_id) Implementation
+ of function to set the session manager client ID.
+
+ * gdk/gdkwindow.c (gdk_window_new): Set
+ WM_CLIENT_LEADER propertiy on all windows pointing
+ back to GDK's leader window.
+
Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
+Sun Jan 17 17:56:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patch from Felix Bellaby <felix@pooh.u-net.com>
+
+ * gdk/gdk.c: Use XmbSetWMProperties to set
+ the class/command on the loader window so that the
+ client machine is also set in the same place.
+ (For X11R5 sesssion management compatibility)
+
+ * gdk/gdk.c: (gdk_set_sm_client_id) Implementation
+ of function to set the session manager client ID.
+
+ * gdk/gdkwindow.c (gdk_window_new): Set
+ WM_CLIENT_LEADER propertiy on all windows pointing
+ back to GDK's leader window.
+
Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap
gdk_progclass[0] = toupper (gdk_progclass[0]);
}
class_hint->res_class = gdk_progclass;
- XSetClassHint(gdk_display, gdk_leader_window, class_hint);
- XSetCommand(gdk_display, gdk_leader_window, argv_orig, argc_orig);
+ XmbSetWMProperties (gdk_display, gdk_leader_window,
+ NULL, NULL, argv_orig, argc_orig,
+ NULL, NULL, class_hint);
XFree (class_hint);
for (i = 0; i < argc_orig; i++)
return return_val;
}
+/*
+ *--------------------------------------------------------------
+ * gdk_set_sm_client_id
+ *
+ * Set the SM_CLIENT_ID property on the WM_CLIENT_LEADER window
+ * so that the window manager can save our state using the
+ * X11R6 ICCCM session management protocol. A NULL value should
+ * be set following disconnection from the session manager to
+ * remove the SM_CLIENT_ID property.
+ *
+ * Arguments:
+ *
+ * "sm_client_id" specifies the client id assigned to us by the
+ * session manager or NULL to remove the property.
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *--------------------------------------------------------------
+ */
+
+void
+gdk_set_sm_client_id (const gchar* sm_client_id)
+{
+ if (sm_client_id && strcmp (sm_client_id, ""))
+ {
+ XChangeProperty (gdk_display, gdk_leader_window,
+ gdk_atom_intern ("SM_CLIENT_ID", FALSE),
+ XA_STRING, 8, PropModeReplace,
+ sm_client_id, strlen(sm_client_id));
+ }
+ else
+ XDeleteProperty (gdk_display, gdk_leader_window,
+ gdk_atom_intern ("SM_CLIENT_ID", FALSE));
+}
+
void
gdk_key_repeat_disable (void)
{
gdk_xid_table_insert (&gdk_root_window, &gdk_root_parent);
}
+static GdkAtom wm_client_leader_atom = GDK_NONE;
+
GdkWindow*
gdk_window_new (GdkWindow *parent,
GdkWindowAttr *attributes,
XSetWMHints (private->xdisplay, private->xwindow, &wm_hints);
+ if (!wm_client_leader_atom)
+ wm_client_leader_atom = gdk_atom_intern ("WM_CLIENT_LEADER", FALSE);
+
+ XChangeProperty (private->xdisplay, private->xwindow,
+ wm_client_leader_atom,
+ XA_WINDOW, 32, PropModeReplace,
+ (guchar*) &gdk_leader_window, 1);
+
if (attributes_mask & GDK_WA_TITLE)
title = attributes->title;
else
gdk_progclass[0] = toupper (gdk_progclass[0]);
}
class_hint->res_class = gdk_progclass;
- XSetClassHint(gdk_display, gdk_leader_window, class_hint);
- XSetCommand(gdk_display, gdk_leader_window, argv_orig, argc_orig);
+ XmbSetWMProperties (gdk_display, gdk_leader_window,
+ NULL, NULL, argv_orig, argc_orig,
+ NULL, NULL, class_hint);
XFree (class_hint);
for (i = 0; i < argc_orig; i++)
return return_val;
}
+/*
+ *--------------------------------------------------------------
+ * gdk_set_sm_client_id
+ *
+ * Set the SM_CLIENT_ID property on the WM_CLIENT_LEADER window
+ * so that the window manager can save our state using the
+ * X11R6 ICCCM session management protocol. A NULL value should
+ * be set following disconnection from the session manager to
+ * remove the SM_CLIENT_ID property.
+ *
+ * Arguments:
+ *
+ * "sm_client_id" specifies the client id assigned to us by the
+ * session manager or NULL to remove the property.
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *--------------------------------------------------------------
+ */
+
+void
+gdk_set_sm_client_id (const gchar* sm_client_id)
+{
+ if (sm_client_id && strcmp (sm_client_id, ""))
+ {
+ XChangeProperty (gdk_display, gdk_leader_window,
+ gdk_atom_intern ("SM_CLIENT_ID", FALSE),
+ XA_STRING, 8, PropModeReplace,
+ sm_client_id, strlen(sm_client_id));
+ }
+ else
+ XDeleteProperty (gdk_display, gdk_leader_window,
+ gdk_atom_intern ("SM_CLIENT_ID", FALSE));
+}
+
void
gdk_key_repeat_disable (void)
{
gdk_xid_table_insert (&gdk_root_window, &gdk_root_parent);
}
+static GdkAtom wm_client_leader_atom = GDK_NONE;
+
GdkWindow*
gdk_window_new (GdkWindow *parent,
GdkWindowAttr *attributes,
XSetWMHints (private->xdisplay, private->xwindow, &wm_hints);
+ if (!wm_client_leader_atom)
+ wm_client_leader_atom = gdk_atom_intern ("WM_CLIENT_LEADER", FALSE);
+
+ XChangeProperty (private->xdisplay, private->xwindow,
+ wm_client_leader_atom,
+ XA_WINDOW, 32, PropModeReplace,
+ (guchar*) &gdk_leader_window, 1);
+
if (attributes_mask & GDK_WA_TITLE)
title = attributes->title;
else